#include "Graphics/IRenderEngine.h"
#include "Graphics/IRenderTarget.h"

namespace tyro
{
	namespace Graphics
	{

		void IRenderEngine::Update()
		{
		}

		IRenderEngine::IRenderEngine()
			: activeRenderTarget(0)
		{

		}

		IRenderEngine::~IRenderEngine()
		{

		}

		IRenderWindow* IRenderEngine::Initialise( const char* const title /*= "tyro"*/ )
		{
			return 0;
		}

		void IRenderEngine::SetRunLog( Framework::LogFile* runLog )
		{
			this->runLog = runLog;
		}

		void IRenderEngine::UpdateRenderTarget()
		{
			activeRenderTarget->Update();
			SwapRenderTargetBuffers();
		}

		void IRenderEngine::AttachRenderTarget( IRenderTarget &renderTarget )
		{
			activeRenderTarget = &renderTarget;
		}

		void IRenderEngine::SwapRenderTargetBuffers()
		{
			activeRenderTarget->swapBuffers();
		}

		void IRenderEngine::RenderOperation( const IRenderOperation& op )
		{

		}

		IDeviceBufferManager* IRenderEngine::GetDeviceBufferManager()
		{
			return bufferManager;
		}

		void IRenderEngine::SetWorldMatrices( const Math::Matrix4f* matrices, USHORT_16 numMatrices )
		{
			SetWorldMatrix(Math::Matrix4f::IDENTITY);
		}

	
		

		

		

		
		

	}
}